package com.miplus.ccrm.core.service.crd;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.yulichang.base.MPJBaseService;
import com.miplus.ccrm.common.CmdResVo;
import com.miplus.ccrm.common.JSysUser;
import com.miplus.ccrm.core.controller.vo.credit.*;
import com.miplus.ccrm.core.controller.vo.sto.CockCaseVo;
import com.miplus.ccrm.core.pojo.CfgActivity;
import com.miplus.ccrm.core.pojo.CfgRuleTaskSteps;
import com.miplus.ccrm.core.pojo.FiCreditcases;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;

/**
* @author pc
* @description 针对表【fi_creditcases(案件表)】的数据库操作Service
* @createDate 2024-03-26 21:59:40
*/
public interface FiCreditcasesService extends MPJBaseService<FiCreditcases> {

    // isEncryption: 关键信息脱敏 true:根据权限脱敏  false:全部脱敏
    IPage<CrdCaseResVo> crdCaseList(JSysUser user, CrdCaseReqVo paras,Boolean isEncryption);
    CrdCaseStatisticsResVo crdCaseListStatistics(JSysUser user, CrdCaseReqVo paras);//crdCaseList

    CrdCaseInfoVo getCrdCaseInfo(JSysUser user, Integer creditcaseid,String popup, String disthistid);

    CrdCaseExtraInfo getCrdCaseExtraInfo(Integer creditcaseid);

    List<ConCompanyResVo> companyList(JSysUser user, String customernumber);

    List<GrpCaseCountVo> grpCaseCountList(GrpListReqVo paras);

    List<DistResVo> fiCaseDistribute(JSysUser user,DistReqVo paras,CrdCaseReqVo distParas);

    List<DistResVo> fiCaseAssign(JSysUser user,AssReqVo paras,CrdCaseReqVo distParas);

    CmdResVo fiCaseRecycle(JSysUser user, RecyReqVo paras,CrdCaseReqVo dataParas);

    CmdResVo getCustFiCaseCount(String custnumber);

    CmdResVo getFiCaseReliefCount(Integer ficaseid);

    int updateCallTask(Integer ficaseid,Integer taskid,Date appointdt);

    IPage<FiAppointResVo> fiAppointCaseList(String $usrid,FiAppointReqVo paras);

    CrdQuySumVo getQueryDebtSum(JSysUser user, CrdCaseReqVo paras);

    CrdCmdResVo refreshBalance(JSysUser user,CrdRefreshBalVo paras);

    CrdCmdResVo refreshNoOutBill(JSysUser user,CrdRefNOutBillVo paras);

    void refreshNotBill(String acctno,String cardno);

    CmdResVo getProdType(Integer ficaseid);

    List<Integer> getCaseIDList(String custno);

    CmdResVo saveAsExcel(JSysUser user, CrdCaseReqVo paras, HttpServletResponse response);

    CmdResVo getRecycleProcess();
    CmdResVo getOneRecyCount(JSysUser user,CrdCaseReqVo dataParas);


    List<FiCreditcases> getDistributeCollectList(String conditionSql);

    List<FiCreditcases> getAssignCollectlist(String conditionSql,String grpId);

    CmdResVo addCollectGrpTag(CfgRuleTaskSteps cfgRuleTaskSteps,String sql);
    CmdResVo removeCollectGrpTag(CfgRuleTaskSteps cfgRuleTaskSteps,String sql);

    CmdResVo DistributeToGrpByRule(String usrId, String ruleStepId, CfgActivity cfgActivity, String sql);


    CmdResVo getNextFiCaseID(JSysUser user,Integer ficaseid);
    CmdResVo getPrevFiCaseID(JSysUser user,Integer ficaseid);

    int bindFiCastList(List<Integer> caseList,JSysUser user,CrdCaseReqVo paras);

    List<AssistListResVo> getAssistCaseList(List<Integer> ficaseids);
}
